//
//  ACollectionViewCell.m
//  MyTrip
//
//  Created by dllo on 15/9/29.
//  Copyright (c) 2015年 张益. All rights reserved.
//

#import "ACollectionViewCell.h"
#import "MyTableViewCell.h"
@interface ACollectionViewCell()<UITableViewDataSource,UITableViewDelegate>

@property (nonatomic , retain ) UITableView *tabel;
@property (nonatomic , retain ) NSMutableArray *array;

@end


@implementation ACollectionViewCell
- (void)dealloc
{
    [_tabel release];[_array release];
    [super dealloc];
}
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createrView];
        self.array = [NSMutableArray array];
    }
    return self;
}
-(void)createrView
{
    
    self.tabel = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 270, 550) style:UITableViewStyleGrouped];
    self.tabel.dataSource = self;
    self.tabel.delegate = self;
    self.tabel.rowHeight = 200;
    self.tabel.bounces = YES;
    self.tabel.showsVerticalScrollIndicator = NO;
    [self.tabel registerClass:[MyTableViewCell class] forCellReuseIdentifier:@"cell"];
    [self.contentView addSubview:self.tabel];
    
    
    
    
    
    
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    
    return 10;
    
    
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    MyTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"cell"];
    return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    [self.tabel deselectRowAtIndexPath:indexPath animated:YES];
    
    
}

@end
